<#include "/includes/vars.inc"> 
<@pp.dropOutputFile />
<@pp.changeOutputFile name="${javaDir}${packageDir}/dao/support/GenericDao.java" />

package ${project.@rootPackage}.dao.support;

import java.util.List;
import javax.persistence.EntityManager;

/**
 * Interface GenericDao
 * <#if project.@author[0]??>@author ${project.@author}</#if>
 */
public interface GenericDao<T> {
    public EntityManager getEntityManager();
    public boolean create(T entity);
    public boolean delete(T entity) ;
    public boolean update(T entity);
    public T findById(Long id);
    public List<T> findAll();
    public List<T> findAll(int firstResult, int maxResults);
    public void clear();
    public void flush();
}